<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkOrderListRangeGetRequest extends Request
{
    /**
     * 用时间段查询推广订单接口
     * @var string
     */
    private $type = 'pdd.ddk.order.list.range.get';

    /**
     * 是否为礼金订单，查询礼金订单时，订单类型不填（默认推广订单）。
     * @var
     */
    private $cashGiftOrder;

    /**
     * 支付结束时间，格式: "yyyy-MM-dd HH:mm:ss" ，比如 "2020-12-01 00:00:00"
     * @var
     */
    private $endTime;

    /**
     * 上一次的迭代器id(第一次不填)
     * @var
     */
    private $lastOrderId;

    /**
     * 每次请求多少条，建议300
     * @var
     */
    private $pageSize;

    /**
     * 订单类型：1-推广订单；2-直播间订单
     * @var
     */
    private $queryOrderType;

    /**
     * 支付起始时间，格式: "yyyy-MM-dd HH:mm:ss" ，比如 "2020-12-01 00:00:00"
     * @var
     */
    private $startTime;

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function setCashGiftOrder($cashGiftOrder)
    {
        $this->cashGiftOrder = $cashGiftOrder;
    }

    public function getCashGiftOrder()
    {
        return $this->cashGiftOrder;
    }

    public function setEndTime($endTime)
    {
        $this->endTime = $endTime;
    }

    public function getEndTime()
    {
        return $this->endTime;
    }

    public function setLastOrderId($lastOrderId)
    {
        $this->lastOrderId = $lastOrderId;
    }

    public function getLastOrderId()
    {
        return $this->lastOrderId;
    }

    public function setPageSize($pageSize)
    {
        $this->pageSize = $pageSize;
    }

    public function getPageSize()
    {
        return $this->pageSize;
    }

    public function setQueryOrderType($queryOrderType)
    {
        $this->queryOrderType = $queryOrderType;
    }

    public function getQueryOrderType()
    {
        return $this->queryOrderType;
    }

    public function setStartTime($startTime)
    {
        $this->startTime = $startTime;
    }

    public function getStartTime()
    {
        return $this->startTime;
    }

    public function getParams()
    {
        $params = [
            'type'             => $this->type,
            'cash_gift_order'  => $this->cashGiftOrder,
            'end_time'         => $this->endTime,
            'last_order_id'    => $this->lastOrderId,
            'page_size'        => $this->pageSize,
            'query_order_type' => $this->queryOrderType,
            'start_time'       => $this->startTime,
        ];
        return array_filter($params);
    }
}
